<md-content flex class="workspace-list-content" ng-hide="listTeamWorkspacesController.isLoading">
  <che-list-header che-input-placeholder="Search"
                   che-search-model="listTeamWorkspacesController.workspaceFilter.config.name"
                   che-on-search-change="listTeamWorkspacesController.onSearchChanged(str)"
                   che-hide-search="listTeamWorkspacesController.workspaces.length === 0"
                   che-add-button-title="Add Workspace"
                   che-add-button-href="#/create-workspace?namespace={{listTeamWorkspacesController.team.qualifiedName}}"
                   che-delete-button-title="Delete"
                   che-on-delete="listTeamWorkspacesController.deleteSelectedWorkspaces()"
                   che-hide-delete="listTeamWorkspacesController.cheListHelper.isNoItemSelected"
                   che-hide-header="!listTeamWorkspacesController.workspaces || listTeamWorkspacesController.cheListHelper.visibleItemsNumber === 0">
    <div flex="100"
         layout="row"
         layout-align="start stretch"
         class="che-list-item-row">
      <div layout="column" layout-gt-xs="row"
           layout-align="start center"
           class="che-checkbox-area">
        <div layout="row" layout-align="center center" class="che-list-item-checkbox-main">
          <md-checkbox class="che-list-item-checkbox"
                       aria-label="Workspace list"
                       ng-checked="listTeamWorkspacesController.cheListHelper.areAllItemsSelected"
                       ng-click="listTeamWorkspacesController.cheListHelper.changeBulkSelection()"></md-checkbox>
        </div>
      </div>
      <div flex hide-xs layout-gt-xs="row"
           layout-align="start center"
           class="che-list-item-details">
        <che-list-header-column flex-gt-xs="25"
                                che-sort-value='listTeamWorkspacesController.workspaceOrderBy'
                                che-sort-item='config.name'
                                che-column-title='Name'></che-list-header-column>
        <che-list-header-column flex-gt-xs="15"
                                che-sort-value='listTeamWorkspacesController.workspaceOrderBy'
                                che-sort-item='config.environments[0].machineConfigs[0].limits.ram'
                                che-column-title='RAM'></che-list-header-column>
        <che-list-header-column flex-gt-xs="15"
                                che-sort-value='listTeamWorkspacesController.workspaceOrderBy'
                                che-sort-item='config.projects'
                                che-column-title='Projects'></che-list-header-column>
        <che-list-header-column flex-gt-xs="30"
                                che-sort-value='listTeamWorkspacesController.workspaceOrderBy'
                                che-sort-item='attributes.stackId'
                                che-column-title='Stack'></che-list-header-column>
        <che-list-header-column flex-gt-xs="15"
                                che-column-title='Actions'></che-list-header-column>
      </div>
    </div>
  </che-list-header>
  <che-list ng-show="listTeamWorkspacesController.cheListHelper.visibleItemsNumber > 0">
    <che-workspace-item
      ng-repeat="workspace in listTeamWorkspacesController.cheListHelper.getVisibleItems() | orderBy:[listTeamWorkspacesController.workspaceOrderBy, 'config.name']"
      ng-model="listTeamWorkspacesController.cheListHelper.itemsSelectionStatus[workspace.id]"
      che-selectable="true"
      che-display-labels="false"
      che-on-checkbox-click="listTeamWorkspacesController.cheListHelper.updateBulkSelectionStatus()"
      che-workspace-item="workspace"></che-workspace-item>
  </che-list>
  <div class="che-list-empty">
    <span ng-show="listTeamWorkspacesController.workspaces.length > 0 && listTeamWorkspacesController.cheListHelper.visibleItemsNumber === 0">
          No workspaces found.
    </span>
    <span ng-show="!listTeamWorkspacesController.workspaces || listTeamWorkspacesController.workspaces.length === 0">There are no workspaces.</span>
  </div>
</md-content>
